package com.ruibang.glass.etl.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * <p>
 * 
 * </p>
 *
 * @author Auto-generator
 * @since 2024-04-25
 */

@ApiModel(value ="")
@TableName("czhqj")
@Data
public class Czhqj {

    @TableId(value = "id")
    private Integer id;
    @TableField("cz30_cz_hqj30_GlassID1_VALUE")
    private Integer cz30CzHqj30Glassid1Value;
    @TableField("cz30_cz_hqj30_GlassID1_TIMESTAMP")
    private String cz30CzHqj30Glassid1Timestamp;

    public void setCz30CzHqj30Glassid1Timestamp(String cz30CzHqj30Glassid1Timestamp){

        if(StringUtils.isNotBlank(cz30CzHqj30Glassid1Timestamp) && cz30CzHqj30Glassid1Timestamp.matches("\\d+")){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            this.cz30CzHqj30Glassid1Timestamp = sdf.format(new Date(Long.valueOf(cz30CzHqj30Glassid1Timestamp)));
        }else
            this.cz30CzHqj30Glassid1Timestamp = cz30CzHqj30Glassid1Timestamp;
    }

    @TableField("cz30_cz_hqj30_GlassID2_VALUE")
    private Integer cz30CzHqj30Glassid2Value;
    @TableField("cz30_cz_hqj30_GlassID3_VALUE")
    private Integer cz30CzHqj30Glassid3Value;
    @TableField("cz30_cz_hqj30_GlassID4_VALUE")
    private Integer cz30CzHqj30Glassid4Value;
    @TableField("cz30_cz_hqj30_GlassID5_VALUE")
    private Integer cz30CzHqj30Glassid5Value;
    @TableField("cz30_cz_hqj30_GlassID6_VALUE")
    private Integer cz30CzHqj30Glassid6Value;
    @TableField("cz30_cz_hqj30_GlassID7_VALUE")
    private Integer cz30CzHqj30Glassid7Value;
    @TableField("cz30_cz_hqj30_HQJ_takt_time_VALUE")
    private Double cz30CzHqj30HqjTaktTimeValue;
}
